using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Fields
{
    /// <summary>
    /// <para>Add Incrementing ID Field</para>
    /// <para>Adds a database-maintained ID field to an existing table or feature class in a Dameng, IBM Db2, Microsoft Azure SQL Database, Microsoft SQL Server, Oracle, or PostgreSQL database. A database-maintained ID field is required for all feature classes or tables you plan to edit through a feature service.</para>
    /// <para>将数据库维护的 ID 字段添加到 Dameng、IBM Db2、Microsoft Azure SQL 数据库、Microsoft SQL Server、Oracle 或 PostgreSQL 数据库中的现有表或要素类。对于计划通过要素服务进行编辑的所有要素类或表，都需要数据库维护的 ID 字段。</para>
    /// </summary>    
    [DisplayName("Add Incrementing ID Field")]
    public class AddIncrementingIDField : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddIncrementingIDField()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Table</para>
        /// <para>The location and name of the table or feature class to which an ID field will be added.</para>
        /// <para>将添加 ID 字段的表或要素类的位置和名称。</para>
        /// </param>
        public AddIncrementingIDField(object _in_table)
        {
            this._in_table = _in_table;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Add Incrementing ID Field";

        public override string CallName => "management.AddIncrementingIDField";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_table, _field_name, _out_table];

        /// <summary>
        /// <para>Input Table</para>
        /// <para>The location and name of the table or feature class to which an ID field will be added.</para>
        /// <para>将添加 ID 字段的表或要素类的位置和名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Field Name</para>
        /// <para>The name to be used for the ID field. If no input is provided, the default ObjectID will be used.</para>
        /// <para>要用于 ID 字段的名称。如果未提供任何输入，则将使用默认的 ObjectID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _field_name { get; set; } = null;


        /// <summary>
        /// <para>Updated Input Table</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_table { get; set; }


        public AddIncrementingIDField SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}